﻿<%@ Page Title="<%$ Resources:SiteResources, ManageAccount %>" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Festival_Locator.Account.Manage" %>

<%@ Register Src="~/Account/OpenAuthProviders.ascx" TagPrefix="uc" TagName="OpenAuthProviders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <hgroup class="title">
        <h1><%: Title %>.</h1>
    </hgroup>

    <section id="passwordForm">
        <div style="float: left;">
            <asp:PlaceHolder runat="server" ID="successMessage" Visible="false" ViewStateMode="Disabled">
                <p class="message-success"><%: SuccessMessage %></p>
            </asp:PlaceHolder>

            <p> <asp:Label ID="Label4" runat="server" Text="<%$ Resources:SiteResources, Logged %>"></asp:Label> <strong><%: User.Identity.Name %></strong>.</p>
            <p>

                <asp:Label ID="Label3" runat="server" Text=""></asp:Label>


            </p>

            <asp:PlaceHolder runat="server" ID="setPassword" Visible="false">
                <p>
                   <asp:Label ID="Label5" runat="server" Text="<%$ Resources:SiteResources, ManageMess %>" Width="504px"></asp:Label>
       
                </p>
                <fieldset>
                    <legend>Set Password Form</legend>
                    <ol>
                        <li>
                            <asp:Label ID="Label1" runat="server" AssociatedControlID="password" Text="<%$ Resources:SiteResources, Password %>"></asp:Label>
                            <asp:TextBox runat="server" ID="password" TextMode="Password" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="password"
                                CssClass="field-validation-error" ErrorMessage="<%$ Resources:SiteResources,Error %>"
                                Display="Dynamic" ValidationGroup="SetPassword" />

                            <asp:ModelErrorMessage ID="ModelErrorMessage1" runat="server" ModelStateKey="NewPassword" AssociatedControlID="password"
                                CssClass="field-validation-error" SetFocusOnError="true" />

                        </li>
                        <li>
                            <asp:Label ID="Label2" runat="server" AssociatedControlID="confirmPassword"  Text="<%$ Resources:SiteResources, ConfirmPass %>"></asp:Label>
                            <asp:TextBox runat="server" ID="confirmPassword" TextMode="Password" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="confirmPassword"
                                CssClass="field-validation-error" Display="Dynamic" ErrorMessage="<%$ Resources:SiteResources,Error %>"
                                ValidationGroup="SetPassword" />
                            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="Password" ControlToValidate="confirmPassword"
                                CssClass="field-validation-error" Display="Dynamic" ErrorMessage="<%$ Resources:SiteResources,ErrorMismatch %>"
                                ValidationGroup="SetPassword" />
                        </li>
                    </ol>
                    <asp:Button ID="Button1" runat="server" Text="Set Password" ValidationGroup="SetPassword" OnClick="setPassword_Click" />
                </fieldset>
            </asp:PlaceHolder>


            <asp:PlaceHolder runat="server" ID="changePassword" Visible="false">
                <h3>  <asp:Label ID="Label6" runat="server" Text="<%$ Resources:SiteResources, Change %>" Width="504px"></asp:Label></h3>
                <asp:ChangePassword ID="ChangePassword1" runat="server" CancelDestinationPageUrl="~/" ViewStateMode="Disabled" RenderOuterTable="false" SuccessPageUrl="Manage?m=ChangePwdSuccess">
                    <ChangePasswordTemplate>
                        <p class="validation-summary-errors">
                            <asp:Literal runat="server" ID="FailureText" />
                        </p>
                        <fieldset class="changePassword">
                            <legend>Change password details</legend>
                            
                                    <asp:Label runat="server" ID="CurrentPasswordLabel" AssociatedControlID="CurrentPassword" Text="<%$ Resources:SiteResources, Curr %>"></asp:Label>
                                    <asp:TextBox runat="server" ID="CurrentPassword" CssClass="passwordEntry" TextMode="Password" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="CurrentPassword"
                                        CssClass="field-validation-error" ErrorMessage="<%$ Resources:SiteResources,Error %>"
                                        ValidationGroup="ChangePassword" />
                                
                                    <asp:Label runat="server" ID="NewPasswordLabel" AssociatedControlID="NewPassword" Text="<%$ Resources:SiteResources, NewPass %>"></asp:Label>
                                    <asp:TextBox runat="server" ID="NewPassword" CssClass="passwordEntry" TextMode="Password" />
                                    <ajaxToolkit:PasswordStrength ID="NewPassStrength" runat="server" TargetControlID="NewPassword" HelpHandlePosition="AboveRight" StrengthIndicatorType="Text" MinimumLowerCaseCharacters="6"></ajaxToolkit:PasswordStrength>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="NewPassword"
                                        CssClass="field-validation-error" ErrorMessage="<%$ Resources:SiteResources,Error %>"
                                        ValidationGroup="ChangePassword" />
                                
                                    <asp:Label runat="server" ID="ConfirmNewPasswordLabel" AssociatedControlID="ConfirmNewPassword" Text="<%$ Resources:SiteResources, ConfirmPass %>"></asp:Label>
                                    <asp:TextBox runat="server" ID="ConfirmNewPassword" CssClass="passwordEntry" TextMode="Password" />
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ConfirmNewPassword"
                                        CssClass="field-validation-error" Display="Dynamic" ErrorMessage="<%$ Resources:SiteResources,Error %>"
                                        ValidationGroup="ChangePassword" />
                                    <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword"
                                        CssClass="field-validation-error" Display="Dynamic" ErrorMessage="<%$ Resources:SiteResources,ErrorMismatch %>"
                                        ValidationGroup="ChangePassword" />
                              <br />
                            <asp:Button class="btn" ID="Button2" runat="server" CommandName="ChangePassword" Text="<%$ Resources:SiteResources, Change %>" ValidationGroup="ChangePassword" />
                        </fieldset>
                    </ChangePasswordTemplate>
                </asp:ChangePassword>
            </asp:PlaceHolder>
        </div>

        <asp:PlaceHolder runat="server" ID="ManageUsers" Visible="true">
            <div style="float: right;">
                <asp:GridView ID="GridView2" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="UserId" DataSourceID="EntityDataSource2" OnRowDeleting="GridView2_RowDeleting" OnRowDataBound="GridView2_RowDataBound">
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                        <asp:BoundField DataField="UserName" HeaderText="<%$ Resources:SiteResources,Username %>" SortExpression="UserName" />
                    </Columns>
                </asp:GridView>
                <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=groep12_festivalsEntities" DefaultContainerName="groep12_festivalsEntities" EnableDelete="True" EnableFlattening="False" EnableUpdate="True" EntitySetName="Users">
                </asp:EntityDataSource>
            </div>
        </asp:PlaceHolder>
    </section>






    <!--
     <asp:ListView ID="users" runat="server">
         <EmptyDataTemplate>      
                                <table id="Table1" runat="server">        
                                    <tr>          
                                        <td>No data was returned.</td>        
                                    </tr>     
                                </table>  
                            </EmptyDataTemplate>  
                            <EmptyItemTemplate>     
                                <td id="Td1" runat="server" />  
                            </EmptyItemTemplate>  

            <LayoutTemplate>
                <ul>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </ul>
            </LayoutTemplate>
            <ItemTemplate>
                <li>
                   <%# Container.DataItem %> 
                </li>

            </ItemTemplate>
        </asp:ListView>
    -->
</asp:Content>
